import os
import os.path
import zipfile

f=zipfile.ZipFile('F:\\archive.zip','w',zipfile.ZIP_DEFLATED)

for dirpsth,dirnames,filenames in os.walk("F:\\DataSets\\easy_ham"):
    for filename in filenames:
        f.write(os.path.join(dirpsth,filename))

f.close()
